<?php
namespace app\know\validate;

use think\Validate;

class GrammarQuestionValidate extends Validate
{
    protected $rule = [
        'grammar_uuid' => 'require|length:32',
		'question_uuid' => 'require|length:32',
        'id' => 'require|gt:0',
    ];

    protected $message = [
        'grammar_uuid.require' => '语法ID为必填项',
        'grammar_uuid.length' => '语法ID长度不和标准',		
        'question_uuid.require' => '试题ID为必填项',
        'question_uuid.length' => '试题ID长度不和标准',
        'id.require' => 'id不能为空',
    ];

    protected $scene = [
        'add'  => ['grammar_uuid', 'question_uuid'],
        'edit' => ['id', 'grammar_uuid', 'question_uuid'],
        'delete' => ['id'],
    ];
}